package org.example.mybatis_demo.controller;

import org.example.mybatis_demo.model.UserInfo;
import org.example.mybatis_demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("/hello")
@RestController
public class UserController {
    @Autowired
    private UserService userService;

    @RequestMapping("/getAllUserInfo")
    public List<UserInfo> getAllUserInfo(){
       return  userService.getUserInfoAll();
    }
}
